<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>购物车</title>
    <link rel="stylesheet" href="../stylesheets/common.css"/>
    <link rel="stylesheet" href="../stylesheets/pay.css" />
    <script type="text/javascript" src="../javascripts/jQuery.min.js"></script>
    <script type="text/javascript" src="../javascripts/template.js"></script>
    <script type="text/javascript" src="../javascripts/underscore.js"></script>
    <script type="text/javascript" src="../javascripts/moment.js"></script>
    <script type="text/javascript" src="../javascripts/common.js"></script>
    <script type="text/javascript" src="../javascripts/pay.js"></script>

    <script id="payTpl" type="text/html">
        <%for(var i = 0; i < list.length; i++) {%>
        <tr>
            <td><%:=list[i].type%></td>
            <td><%:=list[i].name%></td>
            <td><%:=list[i].price%></td>
            <td><%:=list[i].unit%></td>
            <td><%:=list[i].count%></td>
            <td><%:=list[i].subtotal%></td>
        </tr>
        <%}%>
    </script>
    <script id="giftTpl" type="text/html">
        <%for(var i = 0; i < list.length; i++) {%>
        <tr>
            <td><%:=list[i].type%></td>
            <td><%:=list[i].name%></td>
            <td><%:=list[i].count%></td>
        </tr>
        <%}%>
    </script>

</head>
<body>
<div class="nav">
    <ul>
        <li><a href="index">Let's Go</a></li>
        <li><a href="index">主页</a></li>
        <li><a href="shopping_list">商品列表</a></li>
        <li>
            <a class="cart" href="cart_list">
                <img src="../images/cart.png" />
                <p id="cart_num">购物车(0)</p>
            </a>
        </li>
    </ul>
</div>

<div class="content">
    <div class="title">购物清单</div>
    <div class="split-line"></div>
    <div class="shopping-info">
        <div id="pay_time"></div>
        <table border="1">
            <thead>
            <th>分类</th>
            <th>名称</th>
            <th>单价(元)</th>
            <th>单位</th>
            <th>数量</th>
            <th>小计</th>
            </thead>
            <tbody id="cart_list_pay_info">
            </tbody>
        </table>
    </div>
    <div class="title">赠送商品</div>
    <div class="split-line"></div>
    <div class="gift-info">
        <table border="1">
            <thead>
            <th>分类</th>
            <th>名称</th>
            <th>数量</th>
            </thead>
            <tbody id="shopping_gift_info">
            </tbody>
        </table>
    </div>
    <div class="show-total">
        <p>总计：<span id="pay_total">0.00</span>元</p>
        <p>节省：<span id="save">0.00</span>元</p>
        <button class="pay-button" onclick="config()">确定</button>
    </div>
</div>

</body>
</html>